var express = require('express');
var router = express.Router();
var {goods, category } = require('../module/wangzibo')

router.get('/', function(req, res) {
  res.json({ message: 'wangzibo router works' });
});

router.get('/goods',async(req,res)=>{
    const data = await goods.find().populate('categroyId')
    res.send({
        code:200,
        data:data
    })
})

module.exports = router;
